package day006.api_gui.itheima02;

import javax.swing.*;

public class JLabelDemo {
    public static void main(String[] args) {
        JFrame jf = new JFrame();
        jf.setTitle("显示文本和图像");
        jf.setSize(400, 300);
        jf.setDefaultCloseOperation(3);
        jf.setLayout(null);
        jf.setLayout(null);
        jf.setAlwaysOnTop(true);

        JLabel jl1 = new JLabel("好好学习，天天向上！");
        jl1.setBounds(0, 0, 100, 20);

        JLabel jl2 = new JLabel(new ImageIcon("study-practice/src/day006/api_gui/images/mn.png"));
        jl2.setBounds(50, 50, 100, 143);

        jf.add(jl1);
        jf.add(jl2);
        jf.setVisible(true);
    }
}
